<script setup>
import { onBeforeMount } from 'vue';
import Probe from './Probe.vue';
const props = defineProps({
  container: {
    type: Object,
  },
  containerIndex: {
    type: Number
  },
  probeType: {
    type: String
  },
  containerType: {
    type: String
  }
})
onBeforeMount(() => {
  // if (props.container.hasOwnProperty('startupProbe')){
  //   props.container['startupProbe'] = {}
  // }
})
// const probeChangedRollback = (probeType) => {
//   props.container[probeType] = 
// }
</script>

<template>
  <Probe :container-type="props.containerType" :container-index="props.containerIndex" :probe="props.container.startupProbe" probe-type="startupProbe" @probe-changed-rollback="(value)=>{props.container.startupProbe=value}"></Probe>
  <Probe :container-type="props.containerType" :container-index="props.containerIndex" style="margin-top: 10px;" :probe="props.container.livenessProbe" probe-type="livenessProbe" title="存活探针(LivenessProbe)" @probe-changed-rollback="(value)=>{props.container.livenessProbe=value}"></Probe>
  <Probe :container-type="props.containerType" :container-index="props.containerIndex" style="margin-top: 10px;" :probe="props.container.readinessProbe" probe-type="readinessProbe" title="就绪探针(ReadinessProbe)" @probe-changed-rollback="(value)=>{props.container.readinessProbe=value}"></Probe>
</template>

<style scoped>
</style>
